package com.enqualcomm.kids.config.userdefault;

import android.support.v4.util.SimpleArrayMap;

/**
 * Created by yinzhiqun on 2015/10/15.
 *
 */
public class CacheEntry {

    private static SimpleArrayMap<String,Object> cache;

    public static Object get(String key){
        if (cache==null){
            cache = new SimpleArrayMap<>();
        }
        return cache.get(key);
    }

    public static void set(String key,Object obj){
        if (cache==null){
            cache = new SimpleArrayMap<>();
        }
        cache.put(key,obj);
    }

    public static void clear(){
        if (cache!=null){
            cache.clear();
        }
    }
}
